/**
 * 
 */
package com.taobao.spring.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.DeclareParents;

import com.taobao.spring.aop.interfaces.UsageTracked;
import com.taobao.spring.aop.interfaces.impl.DefaultUsageTracked;

/**
 * @author tianping.czp
 * 
 */
@Aspect
public class MyIntroductionAspect {

	@DeclareParents(value = "com.taobao.spring.aop.interfaces.impl.DefaultIntroductionTestInterface", defaultImpl = DefaultUsageTracked.class)
	public static UsageTracked usageTracked;

	@Before("execution (* com.taobao.spring.aop.interfaces.impl.DefaultIntroductionTestInterface.test(..)) &&"+"this(usageTracked)")
	public void recordUsage(UsageTracked usageTracked){
		usageTracked.record();
	}
}
